package com.game.base;

import com.game.manager.LookUpManager;


public class SobFactory {
	public static SimulationObject create(String classname){
		Class cl = null;
		try {
			cl = Class.forName(classname);
		} catch (Exception e) {
			e.printStackTrace();
		} 
		SimulationObject obj = null;
		if(cl != null){
			try {
				obj = (SimulationObject)cl.newInstance();
			} catch (Exception e) {
				e.printStackTrace();
				return null;
			}
			if(obj != null){
				LookUpManager.get().addSob(obj);
			}
			return obj;
		}
		else
			return null;
	}
}
